home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
comm
/
irc
/
KuangEleven3Gm.lha
/
Kuang Eleven 3
/
Rexx
/
awayback.amirx
< prev
next >
Wrap
Text File
|
1998-05-09
|
2KB
|
86 lines
/* $VER: awayback.amirx 3.0 (9.5.98) AwayBack.amirx - Kuang Eleven edition
Requires : AmIRC 2 , Kuang Eleven 2.9
Configure the sound to play in the line below
sets BACK
*/
snd='Back.WAV'
options results
defaultaway='Making Coffee'
parse arg line
if line='SHOWLOG' then do
call showlog
exit
end
clip='st_awayargs'right(address(),1)
args=getclip(clip)
call setclip(clip)
call readargs(args,'QUIET=Q/S,VERBOSE=V/S,ALL/S,SHOW/S,BULLSHIT/F')
x=getclip('st_awaymsgs')
if x='' then x='no';else call setclip('st_awaymsgs')
cecho('AwayLog','You have' x 'messages waiting')
if x~='no' then call showlog
call setclip('st_awayt')
str=getclip('st_backstr')
cmd=getclip('st_backcmd')
a=getclip('sc_awaytxt')
if show then "SHOW"
clip='st_orignick'right(address(),1)
onick=getclip(clip)
if onick~='' then do
call setclip(clip)
'RAW NICK' onick
end
if str~='' then do
"CHANNELS"
c=result
"GETCHANNEL"
cc=result
if words(c)~==0 then do i=1 to words(c)
ic=word(c,i)
if ic=cc then 'SAY' cmd
else 'QueueRAW PRIVMSG' ic ':'str
end
if a~='TEXT' then "PLAYSOUND" snd
end
EXIT
/* Shared */
cecho:;"ECHO P="d2c(27)"b«"arg(1)"» TEXT="arg(2)'.';return 0
ply:
if getclip('sc_playsounds')~=='ON' then return 0
'PLAYSOUND _K11'arg(1)'.snd'
return 0
showlog:
f='kuang11/AwayLog'
if open(1,f,'r') then do
pr='AwayLog'
if command='AWAY' then cecho(pr,'Displaying your saved messages')
else do
"GETAWAYSTATE"
if rc=5 then exit
cecho(pr,'You have saved messages from last session')
end
do until eof(1)
y=strip(readln(1))
if y=='' then leave
parse var y n t e
select
when e='PAGE' then cecho(pr,bld(n) 'Paged you at' t)
when e='DCCCHAT' then cecho(pr,bld(n) 'Wanted to chat with you at' t)
otherwise
cecho(pr,bld(n) 'Said At' t ':' e)
end
end
ply('ENDLOG')
cecho(pr,'End of Log')
close(1)
delete(f)
end
return